package com.qst.rongxiaotong.service.serviceImpl;

import com.qst.rongxiaotong.mapper.PurchaseMapper;
import com.qst.rongxiaotong.pojo.Purchase;
import com.qst.rongxiaotong.service.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PurchaseServiceImpl implements PurchaseService {
    @Autowired
    PurchaseMapper purchaseMapper;
    @Override
    public int add(Purchase purchase) {
        purchaseMapper.add(purchase);
        return 0;
    }

    @Override
    public Purchase selectByName(String username) {
        Purchase purchase =purchaseMapper.selectByName(username);
        return purchase;
    }
}
